package com.shopnight.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shopnight.entity.Post;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shopnight.vo.MessageListVo;
import com.shopnight.vo.PostInfoVo;
import com.shopnight.vo.PostListVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 13201
* @description 针对表【post】的数据库操作Mapper
* @createDate 2023-05-08 23:45:34
* @Entity com.shopnight.entity.Post
*/
@Repository
public interface PostMapper extends BaseMapper<Post> {
    Page<PostListVo> getPostList(@Param("page") Page page, @Param("orgId") Integer orgId, @Param("categoryId") Integer categoryId);

    PostInfoVo getPostInfo(@Param("id") Integer id);

    Page<PostListVo> getMyPost(@Param("page") Page page,  @Param("userId") Integer userId);

    List<MessageListVo> getMessageList(@Param("postIds") List<String> postIds);

}




